var img_src = ["watch_img/0.svg", "watch_img/1.svg", "watch_img/2.svg", "watch_img/3.svg", "watch_img/4.svg", "watch_img/5.svg", "watch_img/6.svg", "watch_img/7.svg", "watch_img/8.svg", "watch_img/9.svg"];
// console.log(img_src[0]);

var Num01 = document.querySelector('.A');
var Num02 = document.querySelector('.B');
var Num03 = document.querySelector('.C');
var Num04 = document.querySelector('.D');
var Music = document.querySelector('#All_Watch');
var Con_Music = document.querySelector('#Mu_Controls');



var time_H = new Date().getHours();//获取小时数目
var time_M = new Date().getMinutes();//获取分钟数
var time_Sec = new Date().getSeconds();//获取秒数

Num01.src = img_src[Math.floor(time_H / 10)];//设置对应的数字
Num02.src = img_src[time_H % 10];//设置对应的数字
Num03.src = img_src[Math.floor(time_M / 10)];
Num04.src = img_src[time_M % 10];


var time_M_demo = 0;

setInterval(scan, 1000);
function scan() {
    console.log("1523");

    time_M_demo = new Date().getMinutes();//获取分钟数
    Num03.src = img_src[Math.floor(time_M_demo / 10)];
    Num04.src = img_src[time_M_demo % 10];

    var time_H = new Date().getHours();//获取小时数目
    Num01.src = img_src[Math.floor(time_H / 10)];//设置对应的数字
    Num02.src = img_src[time_H % 10];//设置对应的数字

}

Music.onmouseover = function () {
    Con_Music.play();
    console.log(123);
    Music.style.borderColor = "orange";
    Mu_Controls.volume = "0.5";//修改音量
}
Music.onmouseout = function () {
    Con_Music.pause();
    console.log(123);
    Music.style.borderColor = "rgba(185, 171, 171, 0.29)";


}

// var fix_div = document.querySelector('#fixed_div');

// fix_div.onmouseover = function () {
//     fix_div.src = 'pc01/up.png';
//     console.log(123);
// }
// fix_div.onmouseout = function () {
//     fix_div.src = "pc01/up_01.png";

// }

// window.scrollTo(0, 2000);




// 设置滚动效果
// =-----------------------

var dem01 = document.querySelector('#demo01');
dem01.onclick = function () {
    window.scrollTo({
        top: 800,
        behavior: "smooth"
    });
}


var dem02 = document.querySelector('#demo02');
dem02.onclick = function () {
    window.scrollTo({
        top: 3400,
        behavior: "smooth"
    });
}

var dem03 = document.querySelector('#demo03');
dem03.onclick = function () {
    window.scrollTo({
        top: 4200,
        behavior: "smooth"
    });

}
var demo04 = document.querySelector('#demo04');// 获取被滚动对象
demo04.onclick = function () {
    window.scrollTo(
        {
            top: 5500,
            behavior: "smooth"
        }
    );
}


// 设置滚动效果
// =-----------------------



var fix_div = document.querySelector('#fixed_div');
fix_div.onmouseover = function () {
    fix_div.src = 'pc01/up.png';
    console.log(123);
}
fix_div.onmouseout = function () {
    fix_div.src = "pc01/up_01.png";

}
fix_div.onclick = function () {
    window.scrollTo({
        top: 0,
        behavior: "smooth"
    });
}

var div_demo = document.querySelector('#div_demo');
div_demo.onclick = function () {
    open("html/spring.html");
}